package com.active.hackson.app.web;

import org.springframework.beans.BeanUtils;
import org.springframework.security.core.userdetails.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.active.hackson.app.entities.AppUser;
import com.active.hackson.common.web.BaseController;


@Controller
public class HelloController extends BaseController {

  @RequestMapping("hello")
  public String hello( User user ) {
    
    AppUser user2 = new AppUser();
    BeanUtils.copyProperties( user, user2 );
    commonService.save( user2 );
    logger.debug( "add object" + user2 );
    return "index.jsp";
  }

}
